Genre   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 8
dl 0
loc 22
c 0
b 0
f 0
rs 10

2 Functions

Rating   Name   Duplication   Size   Complexity  
A movie 0 8 1
A tv 0 8 1
1
import { BaseEndpoint } from './baseEndpoint';
2
import { GenresResponse } from '../interfaces/genres';
3
4
/**
5
 * Genre Endpoint Class
6
 */
7
export class Genre extends BaseEndpoint {
8
9
    /**
10
     * Get the list of official genres for movies.
11
     * @return { Promise<GenresResponse> }
12
     * @see https://developers.themoviedb.org/3/genres/get-movie-list
13
     */
14
    public async movie(): Promise<GenresResponse> {
15
        return this.sendGetRequest(`genre/movie/list`);
16
    }
17
18
    /**
19
     * Get the list of official genres for TV shows.
20
     * @return { Promise<GenresResponse> }
21
     * @see https://developers.themoviedb.org/3/genres/get-tv-list
22
     */
23
    public async tv(): Promise<GenresResponse> {
24
        return this.sendGetRequest('genre/tv/list');
25
    }
26
27
}
28